home *** CD-ROM | disk | FTP | other *** search
/ Internet News 2000 October / Internet News 2000-10 - CD-ROM.rar / IN200010.BIN / Browser / ie55 / IEAK5CD.EXE / 1033 / RCDATA / CABINET / ieakhelp.chm / ieak.js < prev    next >
Text File  |  2000-07-13  |  43KB  |  1,089 lines

  1. // Filename: shared.js in Shared.chm
  2. // Version post beta 3 (7)
  3. // version 07.01.99
  4.  
  5. //************************************************ EVENT HANDLING ********************************************
  6. //*******************************************************************************************************************
  7. //  re-directs to the proper event-driven functions.
  8.  
  9. window.onload= loadPage;
  10. document.onclick= onclickTriage;
  11. document.onmouseover= gettingHot;
  12. document.onmouseout= gettingCold;
  13. window.onunload=saveChecklistState;
  14. window.onresize= resizeDiv;
  15.  
  16. //*** The next two lines change properties of collapsed blocks while printing.  Commented out by request.
  17. //window.onbeforeprint= set_to_print;
  18. // window.onafterprint= reset_form;
  19. //********************************************  USER-DEFINED GLOBAL VARIABLES  ************************************
  20. //********************************************************************************************************************
  21. //  The images listed below can all be changed by the user.
  22.  
  23. var sPreviousTip= "Argomento precedente";
  24. var sNextTip= "Argomento successivo";
  25. var sExpandTip= "Espandi/Comprimi";
  26. var sPopupTip= "Visualizza definizione";
  27. var sShortcutTip= "";
  28.  
  29. var moniker= "";                                         // moniker= ""; for flat files
  30. var sSharedCHM= "";                 // sSharedCHM= ""; for flat files
  31.  
  32. var closed = sSharedCHM + "plusCold.gif";                //image used for collapsed item in callExpand()
  33. var closedHot = sSharedCHM + "plusHot.gif";            //hot image used for collapsed item in callExpand()
  34. var expand = sSharedCHM + "minusCold.gif";            //image used for expanded item in callExpand()
  35. var expandHot = sSharedCHM + "minusHot.gif";        //hot image used for expanded item in callExpand()
  36.  
  37. var previousCold= sSharedCHM + "previousCold.gif";
  38. var previousHot= sSharedCHM + "previousHot.gif"; 
  39. var nextCold= sSharedCHM + "nextCold.gif";
  40. var nextHot= sSharedCHM + "nextHot.gif"; 
  41.  
  42. var shortcutCold= sSharedCHM + "shortcutCold.gif";
  43. var shortcutHot= sSharedCHM + "shortcutHot.gif";
  44.  
  45. var popupCold= sSharedCHM + "popupCold.gif";
  46. var popupHot= sSharedCHM + "popupHot.gif";
  47.  
  48. var emptyImg= sSharedCHM + "empty.gif";        //image used for empty expand
  49. var noteImg= sSharedCHM + "note.gif";            //image used for notes
  50. var tipImg= sSharedCHM + "tip.gif";            //image used for tips
  51. var warningImg= sSharedCHM + "warning.gif";        //image used for warnings
  52. var cautionImg= sSharedCHM + "caution.gif";        //image used for cautions
  53. var importantImg= sSharedCHM + "important.gif";        //image used for important notice
  54. var relTopicsImg= sSharedCHM + "rel_top.gif";        //image used for important notice
  55.  
  56. var branchImg= sSharedCHM + "elle.gif";
  57. var branchImg_RTL= sSharedCHM + "elle_rtl.gif";
  58.  
  59.  
  60. //********************************************  GLOBAL VARIABLES  ******************************************
  61. //********************************************************************************************************
  62.  
  63. var printing = "FALSE";
  64. var single = "FALSE";
  65. var scroller = "FALSE";
  66. var isRTL= (document.dir=="rtl");
  67. var imgStyleRTL= ""; 
  68.       if (isRTL) imgStyleRTL=" style='filter:flipH' ";
  69.  
  70. var sActX_TDC= "CLASSID='CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83'";        //Tabular Data Control  for  reusable text data
  71. var sSharedReusableTextFile= sSharedCHM + "shared.txt";                                        // common reusable text file
  72. var sSharedReusableTextFileRecord= "para";                                                        //reusable text record
  73.  
  74. var numbers= /\d/g;                //javascript regular expression
  75. var spaces= /\s/g;                //javascript regular expression
  76. var semicolon= /;/g;            //javascript regular expression
  77.  
  78. var isIE5= (navigator.appVersion.indexOf("MSIE 5")>0) || (navigator.appVersion.indexOf("MSIE")>0 && parseInt(navigator.appVersion)> 4);
  79. var isPersistent= false;
  80.  
  81.  
  82. //********************************************  INITIALIZATION  *************************************************
  83. //******************************************************************************************************************
  84.  
  85. //*** loadPage **********************************************************************************************
  86. //  Adds the default image tags and re-usable text to the HTML page.
  87.  
  88. function loadPage(){
  89. isPersistent= (document.all.item("checklist")!=null) && (isIE5);
  90.  
  91.   setPreviousNext();
  92.   resizeDiv();
  93.   if (isPersistent) getChecklistState();
  94.   addReusableText();
  95.   insertImages();
  96. }
  97.  
  98. // **** RESIZE GLOSSARY 
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105. //****** setPreviousNext  ************************************************************************ ********************************************************************************************* 
  106. // insert previous/next navbar
  107. // called by: <div id="nav">@@HTMLsequenceFile.txt or .lst@@</div>
  108.  
  109. function setPreviousNext(){
  110.  
  111.  
  112.   var oNav = document.all.item("nav");
  113.         if (oNav == null ) return;
  114.   
  115.   var sPreviousALT= sPreviousTip;
  116.   var sNextALT= sNextTip;
  117.   var sHTMLfile= oNav.innerHTML;
  118.  
  119.   var imgPrev= "<IMG SRC='"+previousCold+"' BORDER=0 ALT='"+ sPreviousALT +"' ALIGN='top' "+ imgStyleRTL +">";
  120.   var imgNext= "<IMG SRC='"+nextCold+"' BORDER=0 ALT='"+ sNextALT  + "' ALIGN='top' "+ imgStyleRTL +">";
  121.   
  122.   var previousNextObject= "<OBJECT ID='HTMlist' WIDTH=100 HEIGHT=51 " + sActX_TDC +"><param name='DataURL' value='"
  123.         +sHTMLfile +"'><param name='UseHeader' value=True></OBJECT>";
  124.       
  125.         oNav.innerHTML= "<TABLE WIDTH='100%' STYLE='margin-top:0;' cellspacing=0>"
  126.         + "<TR><TD style='text-align=left; background-color:transparent'><A ID='previousLink' HREF='#' REL='previous' CLASS='navbar'>"
  127.         +imgPrev + "</A></TD><TD width='100%' align='center'></td><TD style='text-align=right; background-color:transparent'><A ID='nextLink' HREF='#' REL='next' CLASS='navbar'>"
  128.         +imgNext+ "</A></TD></TR></TABLE>";
  129.                     
  130.       document.body.innerHTML= document.body.innerHTML +  previousNextObject;
  131.       findPageSeq();
  132.       if (printing == "TRUE") return;
  133.       var  thisLoc= document.location.href +"#";
  134.  
  135.       if (previousLink.href== thisLoc) previousLink.style.display="none";
  136.       else  previousLink.style.display="block";
  137.  
  138.       if (nextLink.href== thisLoc) nextLink.style.display="none";
  139.       else  nextLink.style.display="block";
  140.       
  141. }
  142.  
  143. //****** findPageSeq *********************************************************************************************
  144. // finds this page in the "html sequence list" file (filename.lst) and determines the previous & next pages from the list
  145. // the list is created from a tool named "chumper"
  146.  
  147. function findPageSeq() {
  148.  
  149. var rs= HTMlist.recordset;
  150. var thisLoc= document.location.href;
  151. var iLoc= thisLoc.lastIndexOf("/");
  152.  
  153.     if (iLoc > 0) thisLoc= thisLoc.substring(iLoc+1, thisLoc.length);
  154.     
  155.     
  156.     if (nav.style == "[object]") {
  157.                 nav.style.visibility="hidden";
  158.                 printing = "FALSE";
  159.                 }
  160.         else
  161.             {
  162.                 printing = "TRUE";
  163.                 return;
  164.             }
  165.     
  166.        
  167.     rs.moveFirst();
  168.        
  169.     while (!rs.EOF) {
  170.           if (thisLoc == rs.fields("HTMfiles").value){
  171.               nav.style.visibility="visible"; 
  172.                 rs.MoveNext();
  173.               break;
  174.           }
  175.           previousLink.href=rs.fields("HTMfiles").value;      
  176.           rs.moveNext();
  177.      }
  178.                 
  179.       if (!rs.EOF) nextLink.href=rs.fields("HTMfiles").value;
  180. }
  181.  
  182.  
  183. //******Re-usable text ********************************************************************************************* 
  184. // Inserts the Tabular Data Control (TDC) object at the end of the page 
  185. // Inserts "re-usable text" from the txt file at: <span id="@@CHM_name@@@@index#@@" class="reuse"></span>
  186. // e.g.<span id="printing4" class="reuse"></span> for record#4 in the printing.txt in printing.chm.
  187.  
  188. function addReusableText(){
  189.  
  190. var sharedAdded= false;                    // make sure the object is only added once
  191. var CHMspecificAdded= false;                // make sure the object is only added once
  192. var coll = document.all.tags("SPAN");
  193. var sIndex,sRecord,sFile,sFileID,dataBindingObject;
  194.  
  195. // TDC object for shared.chm
  196. var coreObject= "WIDTH=100 HEIGHT=51 "+sActX_TDC+"><param name='UseHeader' value=True><param name='FieldDelim' value='~'><param name='sort' value='INDEX'>";
  197. var shareTextObject = "<OBJECT ID='NTsharedText' " + coreObject + "<param name='DataURL' value='"+sSharedReusableTextFile+"'></OBJECT>";
  198.  
  199.     for (var i=0; i< coll.length; i++)                                   
  200.          if (coll[i].className.toLowerCase()=="reuse"){
  201.              if (isRTL) coll[i].dir= "rtl";
  202.              
  203.              if (coll[i].id == null) return;
  204.              
  205.                 sFile= coll[i].id.toLowerCase();
  206.              sFile= sFile.replace(spaces,"");
  207.              sFileID= sFile;
  208.              sFile= sFile.replace(numbers,""); 
  209.  
  210.              if (sFile == sSharedReusableTextFileRecord) coll[i].dataSrc= "#NTsharedText";
  211.              else coll[i].dataSrc= "#CHMspecificText";
  212.     
  213.              coll[i].dataField= "INDEX";
  214.       
  215.              if (!sharedAdded && sFile==sSharedReusableTextFileRecord){
  216.                  document.body.innerHTML= document.body.innerHTML + shareTextObject;
  217.                  sharedAdded= true;
  218.              }
  219.  
  220.              else if (!CHMspecificAdded && sFile !=sSharedReusableTextFileRecord){
  221.                       dataBindingObject= "<OBJECT ID='CHMspecificText'" + coreObject
  222.                       + "<param name='DataURL' value='"+sSharedCHM+sFile+".txt'></OBJECT>";
  223.                       document.body.innerHTML= document.body.innerHTML + dataBindingObject; 
  224.                       CHMspecificAdded= true;
  225.              }
  226.                     
  227.              if (sFile == sSharedReusableTextFileRecord)
  228.                  sRecord= NTsharedText.recordset;
  229.              else sRecord= CHMspecificText.recordset; 
  230.                                                     
  231.              sRecord.moveFirst(); 
  232.     
  233.               do { sIndex= sRecord.fields("INDEX").value;
  234.                      sText= sRecord.fields("TEXT").value;
  235.                      
  236.                      if (sIndex < sFileID) sRecord.moveNext();
  237.                      else break;
  238.               } while (!sRecord.EOF);
  239.                   
  240.                if (sIndex == sFileID) coll[i].innerHTML= sText;
  241.     }           
  242. }
  243.  
  244.  //****** insertImages ********************************************************************************************* 
  245.  //  Inserts shared images in User-Defined Variables section and thumbnails.
  246.  
  247. function insertImages(){
  248.  
  249. // insert alert icons
  250.   var collP = document.all.tags("P");
  251.   for (var i=0; i<collP.length; i++) {
  252.        if (collP[i].className.toLowerCase()=="note")            collP[i].innerHTML ="<img class='alert' src='"+noteImg+"' "+ imgStyleRTL +"> " +     collP[i].innerHTML;
  253.        else if (collP[i].className.toLowerCase()=="warning")    collP[i].innerHTML ="<img class='alert' src='"+warningImg+"'> " +  collP[i].innerHTML;
  254.        else if (collP[i].className.toLowerCase()=="caution")    collP[i].innerHTML ="<img class='alert' src='"+cautionImg+"'> " +  collP[i].innerHTML;
  255.        else if (collP[i].className.toLowerCase()=="tip")        collP[i].innerHTML ="<img class='alert' src='"+tipImg+"'> " +      collP[i].innerHTML;
  256.        else if (collP[i].className.toLowerCase()=="important")  collP[i].innerHTML ="<img class='alert' src='"+importantImg+"'> " + collP[i].innerHTML;
  257.        else if (collP[i].className.toLowerCase()=="empty")      collP[i].innerHTML ="<img class='alert' src='"+emptyImg+"'> " +    collP[i].innerHTML;
  258.        else if (collP[i].className.toLowerCase()=="reltopics")  collP[i].innerHTML ="<img class='alert' src='"+relTopicsImg+"'> " + collP[i].innerHTML;
  259.   }
  260.   
  261. // insert diagram link icons
  262.   var collA = document.all.tags("A");
  263.   for (var i=0; i<collA.length; i++) {
  264.        if (collA[i].className.toLowerCase()=="diagram")            collA[i].outerHTML =" <img src=\"diagram.gif\" border=0> " + collA[i].outerHTML;
  265.        }
  266.  
  267. //indents for Navigation Tree 
  268. var collUL = document.all.tags("UL");
  269.  
  270. for (var i=0; i<collUL.length; i++) {
  271.        var indent= 0;
  272.        if (collUL[i].className.toLowerCase()=="navtree"){
  273.            if (isRTL) collUL[i].style.listStyleImage= "url('" + branchImg_RTL + "')";
  274.            else collUL[i].style.listStyleImage= "url('" + branchImg + "')";
  275.              for (var j = 0; j < collUL[i].children.length; j++)
  276.                 if (collUL[i].children[j].className.toLowerCase()=="branch"){
  277.                     if (isRTL) collUL[i].children[j].style.marginRight= (indent +'em');
  278.                     else   collUL[i].children[j].style.marginLeft= (indent +'em');
  279.                     indent= indent + 0.75;
  280.                 }
  281.       }
  282. }
  283.    
  284.   for (var i=0; i < document.anchors.length; i++){
  285.          var imgInsert="";  
  286.          var imgStyle= "";
  287.          var imgSpace= "<span class='space'></span>";      
  288.          var oBefore=document.anchors[i].parentElement.tagName;
  289.          var oAnchor= document.anchors[i].id.toLowerCase();
  290.          
  291. // insert RELTOPICS icons
  292. //       if (oAnchor=="reltopics")          
  293. //            if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "reltopics")
  294. //                    imgInsert= "";    // not to re-insert when persistent
  295. //            else  imgInsert= "<img class='alert' src='"+relTopicsImg+"'>" + imgSpace;
  296.             
  297. // insert SHORTCUT icons
  298.        if (oAnchor=="shortcut") {    
  299.             document.anchors[i].title= sShortcutTip;     
  300.             if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "shortcut")
  301.                     imgInsert= "";    // not to re-insert when persistent
  302.             else  imgInsert= "<img class='shortcut' src='"+shortcutCold+"' "+ imgStyleRTL+ ">" + imgSpace;
  303.         }    
  304.                       
  305. // insert POPUP icons
  306.        else if (oAnchor=="wpopup" || oAnchor=="wpopupweb") document.anchors[i].title= sPopupTip;
  307.        else if (document.anchors[i].className.toLowerCase()=="popupicon")
  308.             if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "popup")
  309.                    imgInsert= "";    // not to re-insert when persistent
  310.             else imgInsert= "<img class='popup' src='"+popupCold+"'>" + imgSpace;
  311.  
  312. // insert EXPAND icons 
  313.        else if (oAnchor=="expand") {
  314.               document.anchors[i].title= sExpandTip;
  315.               if (document.anchors[i].children.tags("IMG")(0) && document.anchors[i].children.tags("IMG")(0).className.toLowerCase() == "expand")
  316.                   imgInsert= "";     // not to re-insert when persistent      
  317.               else{ 
  318.                   if (document.anchors[i].parentElement.offsetLeft == document.anchors[i].offsetLeft) {
  319.                       imgSpace= "<span class='space' style='width:0'></span>";     
  320.                       if (isRTL){ document.anchors[i].parentElement.style.marginRight= "1.5em";  imgStyle=" style=margin-right:'-1.5em'";}
  321.                       else { document.anchors[i].parentElement.style.marginLeft= "1.5em";  imgStyle=" style=margin-left:'-1.5em'";}
  322.                   }      
  323.                   imgInsert= "<img class='expand' src='"+ closed +"' "+imgStyle+">" +imgSpace;
  324.               }
  325.        }
  326.  
  327. // insert thumbnail images       
  328.        else if (oAnchor=="thumbnail"  || oAnchor=="thumbnailweb"){ 
  329.             var sAltText = document.anchors[i].innerHTML;
  330.  
  331.             var sThumbnailText = document.anchors[i].title; 
  332.             var oImg = document.anchors[i].href.toLowerCase();
  333.                   if (oAnchor=="thumbnail") 
  334.                          var sThumbnailImg= moniker + getURL(oImg);
  335.                   else var sThumbnailImg = document.anchors[i].href.toLowerCase();
  336.                 document.anchors[i].outerHTML = "<DIV id='thumbDiv' class='thumbnail'>"+document.anchors[i].outerHTML+"</div>";
  337.                 document.anchors[i].innerHTML = "<img class='thumbnail' src='" + sThumbnailImg + "' alt= ' " + sAltText + "'><p>" +sThumbnailText+"</p>";
  338.                 
  339.                   if (isRTL) thumbDiv.style.styleFloat= "right";
  340.            }
  341.         
  342.         document.anchors[i].innerHTML = imgInsert + document.anchors[i].innerHTML;
  343.        if (isRTL) document.anchors[i].dir="rtl";
  344.    }
  345. }
  346.  
  347.  
  348. //***** onclickTriage ****************************************************************************************
  349. // redirects to the appropriate function based on the ID of the clicked <A> tag.
  350.  
  351. function onclickTriage(){
  352. var e= window.event.srcElement;
  353.  
  354. //  if the innerHTML in the <a> tag is encapsulated by a style tag or hightlighted in the word seach,
  355. //  the parentElement is called.
  356.  
  357.     for (var i=0; i < 5; i++)
  358.            if (e.tagName!="A" && e.parentElement!=null) e= e.parentElement;
  359.     eID= e.id.toLowerCase();
  360.                 
  361.     if (popupOpen) closePopup();
  362.     
  363.  // expand image in a new window
  364.     if (eID=="thumbnail" || eID=="pophtm") popNewWindow(e);
  365.     else if (eID=="thumbnailweb") callThumbnailWeb(e);
  366.     else if (eID=="wpopup")    callPopup(e);
  367.     else if (eID=="wpopupweb") callPopupWeb(e);
  368.     else if (eID=="shortcut")  callShortcut(e);
  369.     else if (eID=="reltopics") callRelatedTopics(e);
  370.     else if (eID=="altloc")    callAltLocation(e);
  371.     else if (eID=="expand")    callExpand(e);
  372.     return;
  373. }
  374.  
  375.  
  376. //*** gettingHot ****************************************************************************************
  377. // Makes all the required changes for mouseover.
  378.  
  379. function gettingHot() {
  380. var e = window.event.srcElement;
  381.   
  382.   if (e.id.toLowerCase()=="cold")  e.id ="hot";
  383.   else if (e.src== previousCold)  e.src = previousHot;
  384.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== previousCold)  e.children.tags("IMG")(0).src= previousHot;
  385.   else if (e.src== nextCold)  e.src = nextHot;
  386.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== nextCold)  e.children.tags("IMG")(0).src= nextHot;
  387.   
  388.   else if (e.className.toLowerCase()=="shortcut" && e.tagName=="IMG")  e.src = shortcutHot;            //<img> tags have a class
  389.   else if (e.id.toLowerCase()=="shortcut")  e.children.tags("IMG")(0).src = shortcutHot;            //<a> tags have an ID
  390.   
  391.   else if (e.className.toLowerCase()=="popup" && e.tagName=="IMG")  e.src = popupHot;            //<img> tags have a class
  392.   else if (e.className.toLowerCase()=="popupicon")  e.children.tags("IMG")(0).src = popupHot;            //<a> tags have an ID
  393.   
  394.   else if ((e.className.toLowerCase()=="expand" && e.tagName=="IMG") ||( e.id.toLowerCase()=="expand")) expandGoesHot(e);
  395.  
  396. }
  397.  
  398. //*** gettingCold **************************************************************************************
  399. // Initial state for mouseout.
  400.  
  401. function gettingCold() {
  402. var e = window.event.srcElement;
  403.  
  404.   if (e.id.toLowerCase()=="hot")  e.id ="cold";
  405.   else if (e.src== previousHot)  e.src = previousCold;
  406.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== previousHot)  e.children.tags("IMG")(0).src= previousCold;
  407.   else if (e.src== nextHot)  e.src = nextCold;
  408.   else if (e.className.toLowerCase()=="navbar" && e.children.tags("IMG")(0).src== nextHot)  e.children.tags("IMG")(0).src= nextCold;
  409.   
  410.   else if (e.className.toLowerCase()=="shortcut" && e.tagName=="IMG")   e.src = shortcutCold;        //<img> tags have a class
  411.   else if (e.id.toLowerCase()=="shortcut")  e.children.tags("IMG")(0).src= shortcutCold;             //<a> tags have an ID
  412.   
  413.   else if (e.className.toLowerCase()=="popup" && e.tagName=="IMG")   e.src = popupCold;        //<img> tags have a class
  414.   else if (e.className.toLowerCase()=="popupicon")  e.children.tags("IMG")(0).src= popupCold;             //<a> tags have an ID
  415.   
  416.   else if ((e.className.toLowerCase()=="expand" && e.tagName=="IMG") ||( e.id.toLowerCase()=="expand")) expandGoesCold(e);
  417. }
  418.  
  419. //****************************************** OBJECT CONSTRUCTION **************************************
  420. //*****************************************************************************************************
  421. //  Uses an A tag to pass parameters between an HTML page and this script.
  422. //  Creates an ActiveX Object from these parameters, appends the Object to the end of the page,
  423. //  and clicks it. These objects relate to HTMLHelp environment and information about them can be found on the http://HTMLHelp site.
  424.  
  425. //  Object construction variables *********************************************************************
  426.  
  427. var sParamCHM,sParamFILE, sParamEXEC, sParamMETA,iEND;
  428. var sActX_HH= " type='application/x-oleobject' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11' ";
  429.  
  430.  
  431. //*** callPopup ***************************************************************************************
  432. // creates an object from an <A> tag HREF, the object inserts a winhelp popup
  433. // called by: <A ID="wPopup" HREF="HELP=@@file_name.hlp@@ TOPIC=@@topic#@@">@@Popup text@@</A>
  434.  
  435. function callPopup(eventSrc) {
  436. var e= eventSrc;
  437. var eH= unescape(e.href);
  438. var eH_= eH.toLowerCase();
  439.        event.returnValue = false;
  440.                                                                
  441.   var iTOPIC      = eH_.lastIndexOf("topic=");
  442.         if (iTOPIC==-1) return;
  443.         sParamTOPIC = eH.substring((iTOPIC+6),eH.length);          // extracts the topic for item2
  444.         
  445.   var iHELP       = eH_.lastIndexOf("help=");
  446.         if (iHELP==-1) return;
  447.         sParamHELP = eH.substring(iHELP+5,iTOPIC);            // extracts the help file for item1
  448.         
  449.         if (document.hhPopup) document.hhPopup.outerHTML = "";    // if hhPopup object exists, clears it
  450.  
  451.  
  452.  var  h= "<object id='hhPopup'"+ sActX_HH + "STYLE='display:none'><param name='Command' value='WinHelp, Popup'>";
  453.       h= h + "<param name='Item1' value='" + sParamHELP + "'><param name='Item2' value='" + sParamTOPIC + "'></object>";
  454.         
  455.         document.body.insertAdjacentHTML("beforeEnd", h);     
  456.         document.hhPopup.hhclick();
  457. }
  458.  
  459.  
  460. //*** callAltLocation******************************************************************************
  461. // creates an object from an <A> tag HREF, the object will navigate to the alternate location if the first location is not found.
  462. // called from: <A ID="altLoc" HREF="CHM=@@1st_chm_name.chm;Alt_chm_name.chm@@  FILE=@@1st_file_name.htm;Alt_file_name.htm@@">@@Link text here@@</A>
  463.    
  464.  
  465. function callAltLocation(eventSrc) {
  466. var e= eventSrc;
  467. var eH= unescape(e.href);
  468. var eH_= eH.toLowerCase();
  469. var sFILEarray,sCHMarray;
  470.      event.returnValue = false;
  471.      
  472.   var sParamTXT= e.innerHTML;
  473.       sParamTXT= sParamTXT.replace(semicolon,"");
  474.                                        
  475.   var iFILE = eH_.lastIndexOf("file=");
  476.         if (iFILE==-1) return;
  477.         sParamFILE= eH.substring((iFILE+5),eH.length);                  // extracts the 2 HTM files
  478.         sParamFILE= sParamFILE.replace(spaces,"");
  479.         iSPLIT= sParamFILE.match(semicolon);
  480.         if (iSPLIT)
  481.               sFILEarray = sParamFILE.split(";");                                        // separates the 2 HTM files
  482.         else return;
  483.           
  484.   var iCHM  = eH_.lastIndexOf("chm=");
  485.         if(iCHM==-1) return;
  486.         else         sParamCHM = eH.substring(iCHM+4,iFILE);            // extracts the 2 CHM's
  487.         sParamCHM= sParamCHM.replace(spaces,"");
  488.         iSPLIT= sParamCHM.match(semicolon);
  489.         if (iSPLIT)
  490.             sCHMarray= sParamCHM.split(";");                                    // separates the 2 CHM's
  491.         else return;
  492.         
  493.         sParamFILE= moniker + sCHMarray[0]+ "::/" + sFILEarray[0] + ";" + moniker + sCHMarray[1]+ "::/" + sFILEarray[1];
  494.                 
  495.         if (document.hhAlt) document.hhAlt.outerHTML = "";                // if hhAlt object exists, clears it
  496.  
  497.  
  498.   var h= "<object id='hhAlt'"+ sActX_HH + "STYLE='display:none'><PARAM NAME='Command' VALUE='Related Topics'>";
  499.       h= h + "<param name='Item1' value='" + sParamTXT +";" + sParamFILE + "'></object>";
  500.     
  501.         document.body.insertAdjacentHTML("beforeEnd", h); 
  502.         document.hhAlt.hhclick();
  503. }
  504.  
  505.  
  506. //*** callRelatedTopics******************************************************************************
  507. // creates an object from an <A> tag HREF, the object inserts a popup of the related topics to select
  508. // called from: <A ID="relTopics" HREF="CHM=@@chm_name1.chm;chm_name2.chm@@ META=@@a_filename1;a_filename2@@">Related Topics</A>
  509.    
  510.  
  511. function callRelatedTopics(eventSrc) {
  512. var e= eventSrc;
  513. var eH= unescape(e.href);
  514. var eH_= eH.toLowerCase();
  515.      event.returnValue = false;
  516.                                        
  517.   var iMETA = eH_.lastIndexOf("meta=");
  518.         if (iMETA==-1) return;
  519.         sParamMETA = eH.substring((iMETA+5),eH.length);              // extracts the META keywords for item2
  520.         
  521.   var iCHM  = eH_.lastIndexOf("chm=");
  522.         if(iCHM==-1) sParamCHM = "";
  523.         else         sParamCHM = eH.substring(iCHM+4,iMETA);            // extracts the CHM files for item1
  524.     
  525.         if (document.hhRel) document.hhRel.outerHTML = "";            // if hhRel object exists, clears it
  526.  
  527.  
  528.   var h= "<object id='hhRel'"+ sActX_HH + "STYLE='display:none'><param name='Command' value='ALink,MENU'>";
  529.       h= h + "<param name='Item1' value='" + sParamCHM + "'><param name='Item2' value='" + sParamMETA + "'></object>";
  530.     
  531.         document.body.insertAdjacentHTML("beforeEnd", h);     
  532.         document.hhRel.hhclick();
  533. }
  534.  
  535. //*** popNewWindow***************************************************************************************
  536. // creates an object from an <A> tag HREF, the object then opens a new window from the image URL found in the HREF
  537. // called from: <a id="thumbnail" title="Enlarge figure" href="CHM=NTArt.chm FILE=@@image_name.gif@@">@@alt text here@@</A>
  538. // the thumbnail image is loaded by loadPage();
  539.  
  540.  
  541. function popNewWindow(eventSrc) {
  542. var eH= eventSrc.href;
  543.       event.returnValue = false;
  544.       
  545.  // extracts the thumbnail image URL from the <a> tag HREF
  546.     sParamFILE =  getURL(eH);
  547.     if (sParamFILE=="") return;
  548.        
  549.  // if the hhWindow object exists, clears it
  550.     if (document.hhWindow) document.hhWindow.outerHTML = "";        
  551.         
  552. var  h =  "<object id='hhWindow'"+ sActX_HH +" STYLE='display:none'><param name='Command' value='Related Topics'>";
  553.      h = h + "<param name='Window' value='$global_largeart'><param name='Item1' value='$global_largeart;" + moniker + sParamFILE+ "'> </object>";
  554.     
  555.      document.body.insertAdjacentHTML("beforeEnd", h);
  556.      document.hhWindow.hhclick();
  557. }
  558.  
  559. //*** callShortcut ***************************************************************************************
  560. // creates an object from an <A> tag, the object then calls the executable code
  561. // called from: <A ID="shortcut" HREF="EXEC=@@executable_name.exe@@ CHM=shared.chm FILE=@@error_file_name.htm@@">@@Shortcut text@@</A>
  562. // the shortcut image is loaded by loadInitialImg();
  563.  
  564. function callShortcut(eventSrc) {
  565. var e= eventSrc;
  566. var eH= unescape(e.href);
  567. var eH_= eH.toLowerCase();
  568.  
  569.  
  570.     event.returnValue = false;
  571.               
  572.  // extracts the error file URL from the <a> tag HREF
  573.     iEND= eH.length;
  574.     sParamFILE =  getURL(eH);
  575.     
  576. //code added to redirect if shortcut is nonexisting
  577.  
  578. var con_mmc;
  579. var doc_mmc;
  580.  
  581.     doc_mmc = sParamFILE.toLowerCase();
  582.     con_mmc = doc_mmc.indexOf("mmc.chm");
  583.     if (con_mmc != -1){
  584.         doc_mmc = " " + document.location;
  585.         con_mmc = doc_mmc.indexOf("mmc.chm");
  586.         if (con_mmc == -1){
  587.             sParamFILE = "shared.chm::/alt_url_deux.htm"
  588.             }
  589.         }
  590. // *************************************************
  591.         
  592.      
  593.      
  594. var iEXEC = eH_.lastIndexOf("exec="); 
  595.         if (iEXEC==-1) return;
  596.         else sParamEXEC = eH.substring(iEXEC+5,iEND);                // extracts the executable for item1
  597.         
  598.         if (document.hhShortcut) document.hhShortcut.outerHTML = "";            // if the hhShortcut object exists, clears it
  599.     
  600. var  h =  "<object id='hhShortcut'"+ sActX_HH +" STYLE='display:none'> <param name='Command' value='ShortCut'>";
  601.      if(sParamFILE != "") h = h + "<param name='Window' value='" + moniker + sParamFILE+ "'>";
  602.      h = h + "<param name='Item1' value='" + sParamEXEC + "'><param name='Item2' value='msg,1,1'></object>";
  603.  
  604.         document.body.insertAdjacentHTML("beforeEnd", h);
  605.         document.hhShortcut.hhclick();
  606. }
  607.  
  608. //****************************************  EXPAND FUNCTIONS *********************************************************
  609. //********************************************************************************************************************
  610.  
  611. //**  callExpand **************************************************************************************************
  612. //  This expands & collapses (based on current state) "expandable" nodes as they are clicked.
  613. //  Called by: <A ID="expand" href="#">@@Hot text@@</A>
  614. //  Followed by:  <div class="expand">
  615.  
  616. function callExpand(eventSrc) {
  617.  
  618. var e= eventSrc;
  619.     event.returnValue = false;                    // prevents navigating for <A> tag
  620.     
  621. var oExpandable = getExpandable(e); 
  622. var oImg = getImage(e);
  623.  
  624.      if (oExpandable.style.display == "block")
  625.           doCollapse(oExpandable, oImg);
  626.      else doExpand(oExpandable, oImg);
  627. }
  628.  
  629. //** expandGoesHot *********************************************************************************************
  630. // Returns expand image to hot. 
  631.  
  632. function expandGoesHot(eventSrc){
  633. var e= eventSrc;
  634.     
  635. var oExpandable = getExpandable(e);  
  636. var oImg = getImage(e);
  637.  
  638.     if (oExpandable.style.display == "block") oImg.src = expandHot;
  639.     else oImg.src = closedHot;
  640. }
  641.  
  642.  
  643. //** expandGoesCold *********************************************************************************************
  644. // Returns expand image to cold.
  645.  
  646. function expandGoesCold(eventSrc){
  647. var e= eventSrc;
  648.  
  649. var oExpandable = getExpandable(e);   
  650. var oImg = getImage(e);
  651.  
  652.     if (oExpandable.style.display == "block") oImg.src = expand;
  653.     else oImg.src = closed;
  654. }
  655.  
  656.  
  657. //** getExpandable *****************************[used by callExpand, expandGoesHot, expandGoesCold]*******
  658. //  Determine if the element is an expandable node or a child of one.  
  659.  
  660. function getExpandable(eventSrc){
  661. var  e = eventSrc;
  662. var iNextTag, oExpandable;
  663.  
  664.        for (var i=1;i<4; i++){
  665.                iNextTag=    e.sourceIndex+e.children.length+i;
  666.               oExpandable= document.all(iNextTag);
  667.               if (oExpandable.className.toLowerCase()=="expand" || iNextTag == document.all.length)
  668.                    break;
  669.        }
  670.        return oExpandable;
  671. }
  672.  
  673. //**  getImage ***********************************[used by callExpand, expandGoesHot, expandGoesCold]*******
  674. //  Find the first image in the children of the current srcElement.   
  675. // (allows the  image to be placed anywhere inside the <A HREF> tag)
  676.  
  677. function getImage(header) {
  678. var oImg = header;
  679.  
  680.        if(oImg.tagName != "IMG") oImg=oImg.children.tags("IMG")(0);
  681.        return oImg;
  682. }
  683.  
  684.  
  685. //****  expandAll *******************************************************************************************************
  686. //  Will expand or collapse all "expandable" nodes when clicked. [calls closeAll()]
  687. //  called by: <A HREF="#" onclick="expandAll();">expand all</A>
  688.  
  689. var stateExpand = false;    //applies to the page 
  690.  
  691. //**** ****************************************************************************************************************
  692.  
  693. function expandAll() {
  694. var oExpandToggle, oImg;
  695. var expandAllMsg = "expand all";                    //message returned when CloseAll() is invoked
  696. var closeAllMsg = "close all";                        //message returned when ExpandAll() is invoked
  697. var e= window.event.srcElement;
  698.        event.returnValue = false;
  699.  
  700.        for (var i=0; i< document.anchors.length; i++){
  701.                oExpandToggle = document.anchors[i];
  702.          
  703.                 if (oExpandToggle.id.toLowerCase() == "expand"){ 
  704.                      oExpandable = getExpandable(oExpandToggle);  
  705.                      oImg = getImage(oExpandToggle);
  706.              
  707.                      if (stateExpand == true) doCollapse(oExpandable, oImg);
  708.                      else                     doExpand(oExpandable, oImg);
  709.                 }
  710.        }
  711.        if (stateExpand == true) {
  712.             stateExpand = false;
  713.             e.innerText= expandAllMsg;
  714.        }
  715.        else {
  716.             stateExpand = true;
  717.             e.innerText= closeAllMsg;
  718.        }
  719. }
  720.  
  721.  
  722. //****  doExpand *******************************************************************************************************
  723. //  Expands expandable block & changes image
  724.     
  725. var redo = false;    
  726. function doExpand(oToExpand, oToChange) {
  727. var oExpandable= oToExpand;
  728. var oImg= oToChange;
  729.     
  730.     oImg.src = expand;
  731.     oExpandable.style.display = "block";
  732.     
  733.     if (!redo && !isIE5) {
  734.         redo = true;
  735.         focus(oToExpand);
  736.         doExpand(oToExpand, oToChange);
  737.         }
  738.     
  739. }
  740.  
  741.  
  742. //****  doCollapse *****************************************************************************************************
  743. //  Collapses expandable block & changes image
  744.     
  745. function doCollapse(oToCollapse, oToChange) {
  746. if (printing == "TRUE") return;
  747. var oExpandable= oToCollapse;
  748. var oImg= oToChange;
  749.  
  750.     oExpandable.style.display = "none";
  751.     oImg.src = closed;
  752. }
  753.  
  754. //*******************************************************************************************************
  755. //******* WEB  FUNCTIONS **************************************************************************
  756. //*******************************************************************************************************
  757.  
  758. //**** callThumbnailWeb **************************************************************************************
  759.  
  760. function callThumbnailWeb(eventSrc) {
  761. var e= eventSrc;
  762.        event.returnValue = false;
  763.                     
  764. var thumbnailWin= window.open (e.href, "$global_largeart",  "height=450, width=600, left=10, top=10, dependent=yes, resizable=yes, status=no, directories=no, titlebar=no, toolbar=yes, menubar=no, location=no","true");
  765.  
  766. thumbnailWin.document.write ("<html><head><title>Windows 2000</title></head><body><img src='"+e.href+"'></body></html>");
  767.  
  768. return;
  769. }
  770.  
  771. //*********************************************************************************************************
  772. //*********************************************************************************************************
  773.                                 
  774.                                 
  775. var popupOpen= false;                //state of popups
  776. var posX, posY;                        //coordinates of popups
  777. var oPopup;                            //object to be used as popup content
  778.  
  779. //**** callPopupWeb **************************************************************************************
  780. // the web popups have been converted from the object winHelp popup for the web.
  781. // called by: <A ID="wPopupWeb" HREF="#">@@Popup text@@</A>
  782. // followed by: <div class="popup">Popup content</div>
  783.  
  784.  
  785. function callPopupWeb(eventSrc) {
  786. var e= eventSrc;
  787.   
  788.   // find the popup <div> that follows <a id="wPopupWeb"></a>
  789.   findPopup(e);
  790.   positionPopup(e)
  791.  
  792.   oPopup.style.visibility = "visible";
  793.   popupOpen = true;
  794.  
  795.   return;
  796. }
  797.  
  798. //**** findPopup ****************************************************************************************
  799.  
  800. function findPopup(oX){
  801. var e= oX;
  802. var iNextTag;
  803.     
  804.     for (var i=1;i<4; i++){
  805.          iNextTag=    e.sourceIndex + i;
  806.          oPopup= document.all(iNextTag);
  807.          if (oPopup.className.toLowerCase()=="popup" || iNextTag == document.all.length)
  808.              break;
  809.     }
  810.     if (iNextTag != document.all.length) {
  811.         posX = window.event.clientX; 
  812.         posY = window.event.clientY + document.body.scrollTop+10;
  813.     }
  814.     else closePopup();
  815. }
  816.  
  817. //****  positionPopup ************************************************************************************
  818. // Set size and position of popup.
  819. // If it is off the page, move up, but not past the very top of the page.
  820.  
  821. function positionPopup(oX){
  822. var e= oX;    
  823. var popupOffsetWidth = oPopup.offsetWidth;
  824.  
  825. //determine if popup will be offscreen to right
  826. var rightlimit = posX + popupOffsetWidth;
  827.  
  828.   if (rightlimit >= document.body.clientWidth) 
  829.       posX -= (rightlimit - document.body.clientWidth);
  830.   if (posX < 0) posX = 0;
  831.     
  832. //position popup
  833.   oPopup.style.top = posY;
  834.   oPopup.style.left = posX;
  835.  
  836. var pageBottom = document.body.scrollTop + document.body.clientHeight;
  837. var popupHeight = oPopup.offsetHeight;
  838.   
  839.   if (popupHeight + posY >= pageBottom) {
  840.       if (popupHeight <= document.body.clientHeight)
  841.           oPopup.style.top = pageBottom - popupHeight;
  842.       else
  843.            oPopup.style.top = document.body.scrollTop;
  844.   }
  845. }
  846.  
  847. //**** closePopup ****************************************************************************************
  848. // Close Popup
  849. function closePopup() {
  850.  
  851.   oPopup.style.visibility = "hidden";
  852.   popupOpen = false;
  853.   return;
  854. }
  855.  
  856. //*********************************************  GENERAL FUNCTIONS ************************************************
  857. //**************************************************************************************************************************
  858.  
  859. //***ajustImg *************************************************************************************************************
  860. // expands an image to the with of the window or shrinks it to 90px
  861.  
  862. function ajustImg(eventSrc) {
  863. var e= eventSrc;
  864. var fullWidth= document.body.offsetWidth;
  865.  
  866.     fullWidth = fullWidth - 50;
  867.     if (e.style.pixelWidth==90)
  868.          e.style.pixelWidth=fullWidth;
  869.     else e.style.pixelWidth=90;
  870. }
  871.  
  872.  
  873. //**  getURL **************************************[used in callShortcut, popNewWindow& loadPage]********
  874. // extracts the file location (CHM::/HTM) URL 
  875.  
  876. function getURL(sHREF) {
  877. var spaces= /\s/g
  878. var eH = unescape(sHREF);
  879.     eH = eH.replace(spaces,""); 
  880.  
  881. var eH_= eH.toLowerCase();
  882. var sParamFILE= "";
  883. var sParamCHM= "";
  884.  
  885. var iFILE= eH_.lastIndexOf("file=");
  886.     if (iFILE!=-1){
  887.         iEND= iFILE +1;
  888.         sParamFILE = eH.substring(iFILE+5,eH.length);
  889.     }  
  890.  
  891. var iCHM  = eH_.lastIndexOf("chm=");
  892.     if (iCHM!=-1){
  893.         iEND  = iCHM +1;                             // iEND used by callShortcut
  894.  
  895.         sParamCHM = eH.substring(iCHM+4, iFILE);
  896.         sParamFILE= sParamCHM+"::/"+sParamFILE;
  897.     }    
  898.     return sParamFILE;
  899. }
  900.  
  901. //****************************************************************************************************************************
  902. //********************************************  IE5 PERSISTENCE  *************************************************************
  903. //****************************************************************************************************************************
  904.  
  905. var oTD,iTD;         // persistence
  906.  
  907. //****** Persistence for userData ********************************************************************************************* 
  908.  
  909. function getChecklistState(){ 
  910.  
  911.  var pageID= addID();
  912.  
  913.     if (checklist.all== "[object]") {
  914.     oTD=checklist.all.tags("INPUT");
  915.     iTD= oTD.length;
  916.         }
  917.     else
  918.         {
  919.         printing = "TRUE";
  920.         isPersistent = false;
  921.         return;
  922.         }
  923.  
  924.     if (iTD == 0){
  925.         printing = "TRUE";
  926.         isPersistent = false;
  927.         return;
  928.         }
  929.     
  930. // routine added to fix a bug in the ocx 06/14/99    
  931.      lct = document.location + ".";
  932.      xax = 10;
  933.      xax = lct.indexOf("mk:@MSITStore");
  934.      if (xax != -1) {
  935.          lct = "ms-its:" + lct.substring(14,lct.length-1);
  936.         // alert("before reload : " + document.location);
  937.         // alert("replace with : " + lct);
  938.         isPersistent = false;
  939.         document.location.replace(lct);
  940.         isPersistent = true;
  941.         // alert("after reload : " + document.location);
  942.         }     
  943.      else
  944.          {      
  945.          checklist.load("oXMLStore");
  946.         }
  947. // routine added to fix a bug in the ocx 06/14/99
  948.     if (checklist.getAttribute("sPersist"+pageID+"0"))    
  949.     for (i=0; i<iTD; i++){
  950.  
  951.          if (oTD[i].type =="checkbox" || oTD[i].type =="radio"){
  952.          checkboxValue= checklist.getAttribute("sPersist"+pageID+i);
  953.         
  954.          if (checkboxValue=="yes") oTD[i].checked=true;
  955.          else oTD[i].checked=false;
  956.          }// if
  957.          if (oTD[i].type =="text")              
  958.               oTD[i].value= checklist.getAttribute("sPersist"+pageID+i);
  959.      }// for
  960. } // end persistence
  961.  
  962. //**  saveChecklistState *************************************************************************************************************
  963. function saveChecklistState(){
  964. var pageID= addID(); 
  965.  
  966.         if (!isPersistent) return; 
  967.          //  you will need this           document.location
  968.         for (i=0; i<iTD; i++){
  969.  
  970.                 if (oTD[i].type =="checkbox" || oTD[i].type =="radio"){
  971.                  if (oTD[i].checked) checkboxValue="yes";
  972.                  else checkboxValue="no";
  973.                  
  974.                  checklist.setAttribute("sPersist"+pageID+i, checkboxValue);
  975.              }// if
  976.             
  977.               if (oTD[i].type =="text") 
  978.                  checklist.setAttribute("sPersist"+pageID+i, oTD[i].value);
  979.          }    // for
  980.  
  981.  // routine added to fix a bug in the ocx 06/14/99    
  982.      lct = document.location + ".";
  983.      xax = 10;
  984.      xax = lct.indexOf("mk:@MSITStore");
  985.      if (xax != -1) {
  986.          lct = "ms-its:" + lct.substring(14,lct.length-1);
  987.         // alert("before reload : " + document.location);
  988.         // alert("replace with : " + lct);
  989.         isPersistent = false;
  990.         document.location.replace(lct);
  991.         isPersistent = true;
  992.         // alert("after reload : " + document.location);
  993.         }     
  994.      else
  995.          {      
  996.          checklist.save("oXMLStore");
  997.         }
  998. // routine added to fix a bug in the ocx 06/14/99
  999.      
  1000. }//end function
  1001.  
  1002. //**  resizeDiv *******************************[used with callPopupWeb, setPreviousNext}****************************************************
  1003. //  resize the page when the <div class=nav></div> && <div class=text></div> are found
  1004. function resizeDiv(){
  1005. if (printing == "TRUE") return;
  1006. var oNav = document.all.item("nav");
  1007. var oText= document.all.item("text");
  1008.  
  1009.     if (popupOpen) closePopup();
  1010.     if (oText == null) return;
  1011.     if (oNav != null){
  1012.         document.all.nav.style.width= document.body.offsetWidth;
  1013.         document.all.text.style.width= document.body.offsetWidth-4;
  1014.         document.all.text.style.top= document.all.nav.offsetHeight;
  1015.         if (document.body.offsetHeight > document.all.nav.offsetHeight)
  1016.             document.all.text.style.height= document.body.offsetHeight - document.all.nav.offsetHeight;
  1017.          else document.all.text.style.height=0; 
  1018.   }
  1019. }
  1020.  
  1021. //**  addID *************************************************************************************************************
  1022. function addID(){
  1023.  
  1024. var locID = document.location.href; 
  1025. var iHTM = locID.lastIndexOf(".htm");
  1026. var iName=locID.lastIndexOf("/");
  1027.       locID = locID.substring(iName+1,iHTM);
  1028.     
  1029.     return locID;
  1030. }    
  1031. //** set_to_print ***************
  1032. function set_to_print(){
  1033.     var i;
  1034.     printing = "TRUE";
  1035.     
  1036.     if (window.text) {
  1037.         if (!window.text.style){
  1038.             scroller = "FALSE";
  1039.             }
  1040.         else
  1041.             {
  1042.             document.all.text.style.height = "auto";
  1043.             scroller = "TRUE";
  1044.             }
  1045.         }
  1046.         
  1047.     for (i=0; i < document.all.length; i++){
  1048.         if (document.all[i].id == "expand") {
  1049.             callExpand(document.all[i]);
  1050.             single = "TRUE";
  1051.             }
  1052.         if (document.all[i].tagName == "BODY") {
  1053.             document.all[i].scroll = "auto";
  1054.             }
  1055.         if (document.all[i].tagName == "A" && scroller != "TRUE") {
  1056.             document.all[i].outerHTML = "<A HREF=''>" + document.all[i].innerHTML + "</a>";
  1057.             }
  1058.             
  1059.         }
  1060.  
  1061. }
  1062. //** used to reset a page if needed ********************
  1063. function reset_form(){
  1064.  
  1065.     if (single == "TRUE") document.location.reload();
  1066.     if (scroller = "TRUE") document.location.reload();
  1067.     
  1068. }
  1069.  
  1070. //** used to print non-scrolling div's ****************
  1071.  
  1072. function fixdiv(){
  1073.     var i;
  1074.     for (i=0; i < document.all.length; i++){
  1075.         if (document.all[i].tagName == "BODY") {
  1076.             document.all[i].scroll = "auto";
  1077.             }
  1078.         if (document.all[i].tagName == "DIV") {
  1079.             document.all[i].style.height = "auto";
  1080.             }
  1081.         
  1082.         }
  1083. }
  1084.  
  1085. //** on error routine *********************************
  1086. function errorHandler() {
  1087.   // alert("Error Handled");
  1088.   return true;
  1089. }